package com.liuzhilong.infrastructure.framework.netty;


import com.liuzhilong.infrastructure.framework.netty.echo.client.EchoClient;
import com.liuzhilong.infrastructure.framework.netty.echo.server.EchoServer;

/**
 * 启动项
 * @author longandai@163.com
 */
public class Launcher {
    public static void main(String[] args) throws InterruptedException {
        useEcho();
    }


    public static final void useEcho() throws InterruptedException {
        String host= "localhost";
        int port= 10000;

        //启动服务器

        new EchoServer().setHost(host).setPort(port).start();

        //启动client
        new Thread(()->{
            try {
                new EchoClient().setHost(host).setPort(port).start();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }).start();






    }
}
